package com.binguo.model.mapper;


import com.binguo.model.model.NormalConfig;
import com.binguo.model.model.NormalConfigExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Jason
 * @since 2020-04-30
 */
public interface NormalConfigMapper {

    int countByExample(NormalConfigExample example);

    int deleteByExample(NormalConfigExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(NormalConfig record);

    int insertSelective(NormalConfig record);

    List<NormalConfig> selectByExample(NormalConfigExample example);

    NormalConfig selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") NormalConfig record, @Param("example") NormalConfigExample example);

    int updateByExample(@Param("record") NormalConfig record, @Param("example") NormalConfigExample example);

    int updateByPrimaryKeySelective(NormalConfig record);

    int updateByPrimaryKey(NormalConfig record);

    @Select("select * from normal_config where id = #{id}")
    NormalConfig selectById(@Param("id")Integer id);

    @Select("select * from normal_config where shop_id = #{shopId}")
    NormalConfig selectByShopIdAndType(@Param("shopId")Integer shopId);

    @Select("select * from normal_config where !ISNULL(shop_id)")
    List<NormalConfig> selectAllNotNull();

}
